package com.diytomcat.catalina;

import com.diytomcat.util.ServerXMLUtil;

/**
 * @author Leon Plious
 * @decription Service 是 Engine 的父节点，用于代表 tomcat 提供的服务， 它里面会有很多 Connector 对象
 */
public class Service {

	private String name;
	private Engine engine;
	private Server server;
	
	public Service(Server server) {
		this.server = server;
		this.name = ServerXMLUtil.getServiceName();
		this.engine = new Engine(this);
	}
	
	public Engine getEngine() {
		return this.engine;
	}
	
	public Server getServer() {
		return this.server;
	}
}
